package com.ruoyi.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * 体征数据表
 * @TableName vital_signs
 */
@TableName(value ="vital_signs")
@Data
@Getter
@Setter
public class VitalSigns implements Serializable {
    /**
     * 体征数据唯一标识，主键，不可为空
     */
    @Excel(name = "体征数据唯一")
    @TableId(value = "vital_id", type = IdType.AUTO)
    private Long vitalId;

    /**
     * 用户唯一标识，外键，与UserInfo表的UserID关联
     */
    @Excel(name = "用户唯一标识")
    @TableField(value = "user_id")
    private Long userId;

    /**
     * 测量日期，日期格式
     */
    @Excel(name = "测量日期")
    @TableField(value = "measurement_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private String measurementDate;

    /**
     * 体温，浮点数，单位℃
     */
    @Excel(name = "体温(℃)")
    @TableField(value = "temperature")
    private String temperature;

    /**
     * 血压，包括收缩压和舒张压，单位mmHg
     */
    @Excel(name = "血压(mmHg)")
    @TableField(value = "blood_pressure")
    private String bloodPressure;

    /**
         * 呼吸频率，整数，单位次/分
     */
    @Excel(name = "呼吸频率(次/分)")
    @TableField(value = "respiratory_rate")
    private Integer respiratoryRate;

    /**
     * 血氧饱和度，百分比
     */
    @Excel(name = "血氧饱和度(%)")
    @TableField(value = "oxygen_saturation")
    private String oxygenSaturation;

    /**
     * 体重，单位kg
     */
    @Excel(name = "体重(kg)")
    @TableField(value = "weight")
    private Double weight;

    /**
     * 身高，单位cm
     */
    @Excel(name = "身高(cm)")
    @TableField(value = "height")
    private Double height;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)//创建与修改时自动填充
    private Date createTime;

    /**
     * 更新时间
     */
    @Excel(name = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date updateTime;

    /**
     * 逻辑删除
     */
    @TableField(value = "is_delete")
    private Integer isDelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}
